Conversation
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 30 days if no further activity occurs, but feel free to re-open a closed issue if needed. |
Please don't close this issue: I'm still watching it and waiting for a response... |
|
Could you briefly explain how it breaks on Windows? |
|
Firstly, an absolute path on Windows looks like Secondly, there's no English is not my native language, and I have little experience communicating with people; please excuse me or point it out if there's anything wrong with my language. |
xuhdev
left a comment
There was a problem hiding this comment.
Thanks for your explanation. I have added additional comments. Sorry for the delay; The PR overall looks very good!
plugin/latexlivepreview.vim
Outdated
| \ 'TEXINPUTS=' . l:tmp_root_dir | ||
| \ . ':' . b:livepreview_buf_data['root_dir'] | ||
| \ . ': ' . | ||
| \ (has('win32') ? '&& ' : '') . |
There was a problem hiding this comment.
On *NIX, env command has the syntax env [name=value]... [command [arg]...]; but on Windows, an environment variable can only be set by the set command, whose syntax is set [variable=[string]]. So something is needed to combine the set command and the compile command. The only syntax to do this is cmd1 || cmd2 or cmd1 && cmd2 which behaves almost exactly the same as the same shell syntax. So I chose &&, the space after && is to beautify the run_cmd.
Unfortunately, according to its syntax, set can only set one variable, and the set command should be explained as set TEXMFOUTPUT="... TEXINPUTS=..."(i.e. TEXINPUTS=... itself is a part or TEXMFOUTPUT's value), but it works as TEXINPUTS is set properly... I need more work to find out the reason.
Sorry for such long explaination, I have tried my best to simplify and clearify it.
plugin/latexlivepreview.vim
Outdated
|
|
||
| let l:src_file_tail = expand('%:p:r') | ||
| if has('win32') | ||
| " Replace ':' after driver to allow l:src_file_tail |
There was a problem hiding this comment.
| " Replace ':' after driver to allow l:src_file_tail | |
| " Replace ':' after the drive letter with an underscore to allow l:src_file_tail |
|
Thank you for your review! I've just found that on Windows my changes doesn't work for previewing a single file(e.g. I'm sorry that I'm just a senior school student and have little time, so it may take very long for me to test and change it... I'm not familiar with some English expressions; please excuse this... |
|
👋 Thanks a lot @91khr for your work on this pr 🙇 I'm not really familiar with the Windows environment, I might need a little bit of time to get a properly working setup and be able to review the pr |
It seems that this plugin was incompatible with Windows, as
'env 'has shown:)So I made some small changes to make it compatible.(at least for me)
I don't know if there is still somewhere incompatible with Windows,
since I only tested
:LLPStartPreview.